home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / TMONPro301#3 / TMON Pro. Three / Discipline / Discipline Examples / AddrTest2.c < prev    next >
MacBinary  |  1991-04-09  |  1.6 KB  |  [TEXT/MPS ]

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: AddrTest2.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Apr 9 11:58:10 1991, modified Tue Apr 9 11:58:10 1991, creator 'MPS ', type ASCII, 924 bytes "AddrTest2.c" , at 0x41c 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 41 64 64 72 54 65 | 73 74 32 2e 63 00 00 00 |..AddrTe|st2.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 03 9c 00 | 00 01 ac a4 27 95 12 a4 |........|....'...|
|00000060| 27 95 12 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |'.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 fa 9b 00 00 |........|........|
|00000080| 23 69 6e 63 6c 75 64 65 | 09 3c 54 79 70 65 73 2e |#include|.<Types.|
|00000090| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 4d 65 6d |h>.#incl|ude <Mem|
|000000a0| 6f 72 79 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ory.h>.#|include |
|000000b0| 3c 51 75 69 63 6b 44 72 | 61 77 2e 68 3e 0d 23 69 |<QuickDr|aw.h>.#i|
|000000c0| 6e 63 6c 75 64 65 20 3c | 50 61 63 6b 61 67 65 73 |nclude <|Packages|
|000000d0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 53 74 |.h>.#inc|lude <St|
|000000e0| 72 69 6e 67 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |rings.h>|.#includ|
|000000f0| 65 20 3c 53 79 73 45 71 | 75 2e 68 3e 0d 23 69 6e |e <SysEq|u.h>.#in|
|00000100| 63 6c 75 64 65 20 3c 54 | 6f 6f 6c 55 74 69 6c 73 |clude <T|oolUtils|
|00000110| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 54 72 |.h>.#inc|lude <Tr|
|00000120| 61 70 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |aps.h>.#|include |
|00000130| 22 57 69 6d 70 79 2e 68 | 22 0d 0d 2f 2f 63 68 61 |"Wimpy.h|"..//cha|
|00000140| 6e 67 65 64 20 74 68 69 | 73 20 72 6f 75 74 69 6e |nged thi|s routin|
|00000150| 65 20 74 6f 20 43 20 66 | 72 6f 6d 20 70 61 73 63 |e to C f|rom pasc|
|00000160| 61 6c 0d 70 61 73 63 61 | 6c 20 63 68 61 72 20 2a |al.pasca|l char *|
|00000170| 20 20 74 65 73 74 41 64 | 64 72 28 61 64 72 29 0d | testAd|dr(adr).|
|00000180| 50 74 72 09 09 61 64 72 | 3b 0d 7b 0d 23 64 65 66 |Ptr..adr|;.{.#def|
|00000190| 69 6e 65 20 20 61 70 70 | 6c 53 63 72 61 74 63 68 |ine app|lScratch|
|000001a0| 20 09 30 78 41 37 38 0d | 74 79 70 65 64 65 66 20 | .0xA78.|typedef |
|000001b0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 20 2a |unsigned| long *|
|000001c0| 6c 69 6e 74 50 74 72 3b | 09 09 0d 75 6e 73 69 67 |lintPtr;|...unsig|
|000001d0| 6e 65 64 20 6c 6f 6e 67 | 09 6a 75 6e 6b 2c 20 73 |ned long|.junk, s|
|000001e0| 61 76 65 64 4a 75 6e 6b | 2c 6f 6c 64 45 72 72 48 |avedJunk|,oldErrH|
|000001f0| 6e 64 6c 72 3b 0d 2f 2a | 09 6c 6f 61 64 20 65 72 |ndlr;./*|.load er|
|00000200| 72 20 68 61 6e 64 6c 65 | 72 0d 09 73 61 76 65 20 |r handle|r..save |
|00000210| 6f 6c 64 20 61 70 70 6c | 53 63 72 61 74 63 68 20 |old appl|Scratch |
|00000220| 64 61 74 61 0d 09 70 75 | 74 20 31 20 61 74 20 61 |data..pu|t 1 at a|
|00000230| 70 70 6c 53 63 72 61 74 | 63 68 0d 09 61 63 63 65 |pplScrat|ch..acce|
|00000240| 73 73 20 61 64 64 72 65 | 73 73 0d 09 69 73 20 61 |ss addre|ss..is a|
|00000250| 70 70 6c 53 63 72 61 74 | 63 68 20 69 73 20 7a 65 |pplScrat|ch is ze|
|00000260| 72 6f 20 74 68 65 6e 0d | 09 09 65 72 72 6f 72 0d |ro then.|..error.|
|00000270| 09 65 6c 73 65 0d 09 09 | 6e 69 6c 0d 09 72 65 73 |.else...|nil..res|
|00000280| 74 6f 72 65 20 6f 6c 64 | 20 61 70 70 6c 53 63 72 |tore old| applScr|
|00000290| 61 74 63 68 20 64 61 74 | 61 0d 09 75 6e 6c 6f 61 |atch dat|a..unloa|
|000002a0| 64 20 65 72 72 20 68 61 | 6e 64 6c 65 72 0d 2a 2f |d err ha|ndler.*/|
|000002b0| 0d 09 0d 09 6f 6c 64 45 | 72 72 48 6e 64 6c 72 20 |....oldE|rrHndlr |
|000002c0| 3d 20 2a 28 6c 69 6e 74 | 50 74 72 29 30 78 30 30 |= *(lint|Ptr)0x00|
|000002d0| 30 30 30 30 30 38 3b 0d | 09 2a 28 6c 69 6e 74 50 |000008;.|.*(lintP|
|000002e0| 74 72 29 38 20 3d 28 6c | 6f 6e 67 29 26 28 42 75 |tr)8 =(l|ong)&(Bu|
|000002f0| 73 45 72 72 48 61 6e 64 | 6c 65 72 29 3b 0d 09 0d |sErrHand|ler);...|
|00000300| 09 73 61 76 65 64 4a 75 | 6e 6b 20 3d 20 2a 28 6c |.savedJu|nk = *(l|
|00000310| 69 6e 74 50 74 72 29 61 | 70 70 6c 53 63 72 61 74 |intPtr)a|pplScrat|
|00000320| 63 68 3b 0d 09 2a 28 6c | 69 6e 74 50 74 72 29 61 |ch;..*(l|intPtr)a|
|00000330| 70 70 6c 53 63 72 61 74 | 63 68 20 3d 20 31 3b 0d |pplScrat|ch = 1;.|
|00000340| 09 28 6c 6f 6e 67 29 61 | 64 72 20 3d 20 20 28 6c |.(long)a|dr = (l|
|00000350| 6f 6e 67 29 61 64 72 20 | 26 20 30 78 46 45 3b 0d |ong)adr |& 0xFE;.|
|00000360| 09 6a 75 6e 6b 20 3d 20 | 2a 28 6c 69 6e 74 50 74 |.junk = |*(lintPt|
|00000370| 72 29 61 64 72 3b 0d 0d | 09 69 66 28 20 2a 28 6c |r)adr;..|.if( *(l|
|00000380| 69 6e 74 50 74 72 29 61 | 70 70 6c 53 63 72 61 74 |intPtr)a|pplScrat|
|00000390| 63 68 20 3d 3d 20 30 29 | 20 0d 09 09 72 65 74 75 |ch == 0)| ...retu|
|000003a0| 72 6e 28 22 41 64 64 72 | 65 73 73 20 69 73 20 69 |rn("Addr|ess is i|
|000003b0| 6e 76 61 6c 69 64 2e 22 | 29 3b 0d 09 65 6c 73 65 |nvalid."|);..else|
|000003c0| 0d 09 09 72 65 74 75 72 | 6e 28 6e 69 6c 29 3b 0d |...retur|n(nil);.|
|000003d0| 09 0d 09 2a 28 6c 69 6e | 74 50 74 72 29 61 70 70 |...*(lin|tPtr)app|
|000003e0| 6c 53 63 72 61 74 63 68 | 20 3d 20 73 61 76 65 64 |lScratch| = saved|
|000003f0| 4a 75 6e 6b 3b 0d 09 2a | 28 6c 69 6e 74 50 74 72 |Junk;..*|(lintPtr|
|00000400| 29 30 78 30 30 30 30 30 | 30 30 38 20 3d 20 6f 6c |)0x00000|008 = ol|
|00000410| 64 45 72 72 48 6e 64 6c | 72 3b 0d 7d 00 00 00 00 |dErrHndl|r;.}....|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000490| 01 00 0a 00 00 00 00 02 | d0 02 40 22 00 01 ff 9d |........|..@"....|
|000004a0| ff ff a1 00 c0 04 7e 25 | 20 50 32 20 48 65 61 64 |......~%| P2 Head|
|000004b0| 0b 41 64 64 72 54 65 73 | 74 32 2e 63 02 00 00 00 |.AddrTes|t2.c....|
|000004c0| 54 45 58 54 4d 50 53 20 | 01 00 00 00 00 40 00 00 |TEXTMPS |.....@..|
|000004d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 40 |..TEXTMP|S .....@|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 a3 65 80 cf 00 00 | 03 9c 00 00 01 ac 6b 6e |...e....|......kn|
|00000500| 6f 77 6e 7b 63 75 72 72 | 65 6e 74 64 69 63 74 20 |own{curr|entdict |
|00000510| 6d 64 20 65 71 7d 7b 66 | 61 6c 73 65 7d 69 66 65 |md eq}{f|alse}ife|
|00000520| 6c 73 65 7b 62 75 7d 69 | 66 20 63 75 72 72 65 6e |lse{bu}i|f curren|
|00000530| 74 64 69 63 74 2f 50 32 | 5f 64 20 6b 6e 6f 77 6e |tdict/P2|_d known|
|00000540| 20 6e 6f 74 7b 2f 50 32 | 5f 62 7b 50 32 5f 64 0d | not{/P2|_b{P2_d.|
|00000550| 62 65 67 69 6e 7d 62 69 | 6e 64 20 64 65 66 2f 50 |begin}bi|nd def/P|
|00000560| 32 5f 64 20 32 36 20 64 | 69 63 74 20 64 65 66 20 |2_d 26 d|ict def |
|00000570| 75 73 65 72 64 69 63 74 | 2f 6d 64 20 6b 6e 6f 77 |userdict|/md know|
|00000580| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 6b 44 72 |...H..Mo|naco.kDr|
|00000590| 61 77 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |aw.h>.#i|nclude <|
|000005a0| 50 61 63 6b 61 67 00 06 | 00 04 00 46 02 33 03 45 |Packag..|...F.3.E|
|000005b0| 04 4c 00 46 02 33 03 45 | 04 4c a4 27 34 ae 00 00 |.L.F.3.E|.L.'4...|
|000005c0| 00 f2 00 00 00 fa 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000005d0| 00 46 02 33 03 45 04 4c | 00 46 02 33 03 45 04 4c |.F.3.E.L|.F.3.E.L|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 48 |.....n..|.n...>.H|
|00000600| 88 f8 08 74 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |...t....|.>..MPSR|
|00000610| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 03 f0 ff ff 00 00 00 4c | 00 4a 6f dc 00 00 00 00 |.......L|.Jo.....|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+